package com.jdl.iscm.page;

import com.jdl.iscm.common.CommonCmpt;
import com.jdl.iscm.entity.proterties.ReplenishXpathProperties;
import org.openqa.selenium.WebDriver;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Author: Ran
 * @Date: 2021/8/16
 **/
@Component
public class MenuPage {

    @Autowired
    private CommonCmpt commonCmpt;

    /**
     * 参数配置
     *
     * @param webDriver
     * @param xpathProperties
     */
    public void set(WebDriver webDriver, ReplenishXpathProperties xpathProperties) {
        commonCmpt.click(webDriver, xpathProperties.getConfig());
    }

    /**
     * 库存策略
     *
     * @param webDriver
     * @param xpathProperties
     */
    public void stock(WebDriver webDriver, ReplenishXpathProperties xpathProperties) {
        commonCmpt.click(webDriver, xpathProperties.getConfigStock());
    }

    /**
     * 补货参数
     *
     * @param webDriver
     * @param xpathProperties
     */
    public void param(WebDriver webDriver, ReplenishXpathProperties xpathProperties) {
        commonCmpt.click(webDriver, xpathProperties.getConfigParam());
    }
}
